import router from './index'
import store from '../store/index'
router.beforeEach((to, from, next) =>{
    var user=store.state.logMod.username
    if(to.meta.isLogin){
        if(user){
            next()
        }else{
            next({
                path:'/'
            })
        }
    }else{
        next()
    }
})